]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Make sure we don't clip folder view
authorCarlos Soriano <carlos.soriano89@gmail.com>
Fri, 6 Sep 2013 21:31:03 +0000 (23:31 +0200)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Fri, 6 Sep 2013 21:45:50 +0000 (23:45 +0200)
If we round up the value, we make sure we don't clip in any
case neither the folder view or the close button.

js/ui/appDisplay.js

index dbcb8d9b61dd9eb36c8a77a6ae67558bdb5078d3..948d99a1d54a85fb35b11f30aad0690d0aac3b82 100644 (file)
@@ -1072,9 +1072,9 @@ const FolderIcon = new Lang.Class({
         // StWidget delays style calculation until needed, make sure we use the correct values
         this.view._grid.actor.ensure_style();
 
-        let offsetForEachSide = (this._popup.getOffset(St.Side.TOP) +
-                                 this._popup.getOffset(St.Side.BOTTOM) -
-                                 this._popup.getCloseButtonOverlap()) / 2;
+        let offsetForEachSide = Math.ceil((this._popup.getOffset(St.Side.TOP) +
+                                           this._popup.getOffset(St.Side.BOTTOM) -
+                                           this._popup.getCloseButtonOverlap()) / 2);
         // Add extra padding to prevent boxpointer decorations and close button being cut off
         this.view.setPaddingOffsets(offsetForEachSide);
         this.view.adaptToSize(this._parentAvailableWidth, this._parentAvailableHeight);